#define _CRT_SECURE_NO_WARNINGS
#include <cstdio>
#include <queue>
#include <algorithm>


//max nodes
const int MAXN = 100010;
//max edges
const int MAXM = 100010;

//======link forward star=============
int head[MAXN]{};
int next[MAXM]{};
int to[MAXM]{};

int cnt = 1;

//topo sort,use minor heap
int heap[MAXN]{};

int heapSize;

//in degree table
int indegree[MAXN]{};

//to store result
int ans[MAXN]{};

//n is #of nodes, m is #of edges
int n, m;

std::priority_queue<int, std::vector<int>, std::greater<>> q;


static void TopoSort() {
	for (int i = 1; i <= n; i++) {
		if (indegree[i] == 0) {
			q.push(i);
		}
	}

	int fill = 0;
	while (!q.empty()) {
		const int cur = q.top();
		q.pop();
		ans[fill++] = cur;
		for (int edge = head[cur]; edge > 0; edge = next[edge]) {
			if (--indegree[to[edge]] == 0) {
				q.push(to[edge]);
			}
		}
	}


}

/**
 * 输入
 * 5 3
   1 2
   2 4
   4 3

	输出
	1 2 4 3 5
 *
 *
 * @return
 */
int main() {

	scanf("%d%d", &n, &m);

	for (int i = 0; i < m; i++) {
		int f, t;
		scanf("%d%d", &f, &t);

		next[cnt] = head[f];
		head[f] = cnt;
		to[cnt] = t;
		cnt++;

		indegree[t]++;
	}

	TopoSort();


	for (int i = 0; i < n - 1; i++) {
		printf("%d ", ans[i]);
	}

	printf("%d", ans[n - 1]);

    return 0;
}
